<template>
	<view class="cell-box">
		<!-- <view class="banner">
			<uni-icons custom-prefix="custom-icon" :type="'custom-icon-'+iconName" size="30" color="#fff"/>
		</view> -->
		<view class="my-cell-group plr-20">
			<view 
				class="my-cell-item flex justify-between ptb-20" 
				v-for="(item, index) in cellList" 
				:key="item.id"
				@click="onJumpRoute(item)"
			>
				<view class="flex align-center">
					<view class="ibox flex align-center justify-center">
						<uni-icons custom-prefix="custom-icon" :type="'custom-icon-'+item.icon" size="20" color="#fff"/>
					</view>
					<text class="ml-20">{{item.title}}</text>
				</view>
				<u-icon name="arrow-right" size="20" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			// 头部图标
			iconName:{
				type: String,
				default: 'shangpinguanli'
			},
			cellList:{
				type: Array,
				default:[]
			}
		},
		data () {
			return {
				
			}
		},
		methods: {
			onJumpRoute(row){
				if(row.router){
					uni.navigateTo({
						url: row.router
					});
				}else {
					this.$emit('customjump')
				}
			}
		}
	}
</script>

<style lang="scss">
	.banner{
		padding:60upx;
		display:flex;
		justify-content: center;
		align-items: center;
		background-color:$uni-color-primary;
	}
	.my-cell-group{
		background-color: $uni-bg-color;
		.my-cell-item{
			border-bottom: 1px #f5f5f5 solid;
			.ibox{
				background-color:$uni-color-btnc;
				padding:6upx;
				border-radius:4upx;
			}
		}
	}
</style>